package com.assistant.admin.controller;


import com.assistant.admin.pojo.PageResult;
import com.assistant.admin.pojo.PageVariable;
import com.assistant.admin.service.UserManagerService;
import com.assistant.wechat.pojo.WxUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class WxuserController {
    @Autowired
    private UserManagerService wxUserService;

    @PostMapping("/getWxUserList")
    public PageResult<WxUser> getWxUserList(@RequestBody PageVariable pageVariable){
        return wxUserService.getUserBy(pageVariable);
    }

    @DeleteMapping("/delUser/{id}")
    public Boolean deleteUser(@PathVariable("id") Integer id) {
        System.out.println(id);
        return wxUserService.deleteUser(id);
    }
}
